package cn.bdqn.fifth;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

/**
 * @Description TODO
 * @Date 2020/2/12 11:37
 * @Created by 张三三
 */
// 表示该 类 可以被Spring所管理
@Component    // <bean class="cn.bdqn.fifth.Car"></bean>
public class Car {
//    依赖注入配置 基本数据类型
    @Value("大奔")
    private String brand;
    @Value("2000")
    private double price;

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    @Override
    public String toString() {
        return "Car{" +
                "brand='" + brand + '\'' +
                ", price=" + price +
                '}';
    }
}
